package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.vo.ContractCountVO;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.MemoInfoAddDTO;
import org.jsola.hr.dto.MemoInfoBatchDTO;
import org.jsola.hr.dto.MemoInfoUpdateDTO;
import org.jsola.hr.query.MemoInfoQuery;
import org.jsola.hr.vo.HomePageMemoRemindRelationVO;
import org.jsola.hr.vo.MemoInfoListVO;
import org.jsola.hr.vo.MemoInfoVO;
import org.jsola.hr.vo.MemoListVO;

import java.util.List;

/**
 * 备忘录
 *
 * @author zhr
 */
@Api(tags = "hr-备忘录")
public interface IMemoInfoControllerAPI {

    /**
     * 新增备忘录
     * @param memoInfoAddDTO 备忘录新增实体
     * @return 备忘录展示对象
     */
    @ApiOperation(value = "新增备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoAddDTO", dataType = "MemoInfoAddDTO", value = "新增备忘录", paramType = "body")
    })
    Result<MemoInfoVO> save(MemoInfoAddDTO memoInfoAddDTO);


    /**
     * 修改备忘录
     * @param memoInfoUpdateDTO 备忘录
     * @return 更新数量
     */
    @ApiOperation(value = "修改备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoUpdateDTO", dataType = "MemoInfoUpdateDTO", value = "修改备忘录", paramType = "body")
    })
    Result<Integer> update(MemoInfoUpdateDTO memoInfoUpdateDTO);

    @ApiOperation(value = "完成备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoUpdateDTO", dataType = "MemoInfoUpdateDTO", value = "修改备忘录", paramType = "body")
    })
    Result<Integer> completed(MemoInfoUpdateDTO memoInfoUpdateDTO);

    /**
     * 批量编辑、新增、删除备忘录
     * @param memoInfoBatchDTO 要操作的备忘录
     * @return 操作之后的全部备忘录
     */
    @ApiOperation(value = "批量编辑、新增、删除备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoBatchDTO", dataType = "MemoInfoBatchDTO", value = "要操作的字段数据", paramType = "body")
    })
    Result batch(MemoInfoBatchDTO memoInfoBatchDTO);



    /**
     * 删除单个备忘录，彻底删除
     * @param memoInfoId 备忘录id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个备忘录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoId", dataType = "String", value = "备忘录id", paramType = "path")
    })
    Result<Integer> delete(String memoInfoId);


    /**
     * 批量删除备忘录，彻底删除
     * @param memoInfoIds 备忘录id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除备忘录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoIds", dataType = "String[]", value = "备忘录id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] memoInfoIds);


    /**
     * 根据备忘录id查询备忘录详情
     * @param memoInfoId 备忘录id
     * @return 备忘录详情
     */
    @ApiOperation(value="根据备忘录id查询备忘录详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoId", dataType = "String", value = "备忘录id", paramType = "path")
    })
    Result<MemoInfoVO> findById(String memoInfoId);


    /**
     * 查询备忘录
     * @param memoInfoQuery 备忘录查询参数
     * @return page
     */
    @ApiOperation(value="查询备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoQuery", dataType = "MemoInfoQuery", value = "备忘录查询参数", paramType = "query")
    })
    Result<List<MemoInfoListVO>> listAll(MemoInfoQuery memoInfoQuery);


     /**
     * 分页查询备忘录
     * @param memoInfoQuery 备忘录查询参数
     * @return page
     */
    @ApiOperation(value="分页查询备忘录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoQuery", dataType = "MemoInfoQuery", value = "备忘录查询参数", paramType = "query")
    })
    Result<Page<MemoInfoListVO>> page(MemoInfoQuery memoInfoQuery);


    /**
     * 获取首页备忘录提醒相关信息
     * @param memoInfoQuery 备忘录查询参数
     * @return page
     */
    @ApiOperation(value="获取首页备忘录提醒相关信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoQuery", dataType = "MemoInfoQuery", value = "备忘录查询参数", paramType = "query")
    })
    Result<HomePageMemoRemindRelationVO> getHomePageMemoRemindRelation(MemoInfoQuery memoInfoQuery);

    /**
     * 获取今日备忘更多列表
     * @param memoInfoQuery 备忘录查询参数
     * @return page
     */
    @ApiOperation(value="获取今日备忘更多列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoQuery", dataType = "MemoInfoQuery", value = "备忘录查询参数", paramType = "query")
    })
    Result<HomePageMemoRemindRelationVO> getMemoRemindListToday(MemoInfoQuery memoInfoQuery);

    /**
     * 合同概况数量统计
     * @param contractType 合同类型
     * @param subjectId 业务ID
     * @return page
     */
    @ApiOperation(value="合同概况数量统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractType", dataType = "Integer", value = "合同类型", paramType = "query"),
            @ApiImplicitParam(name = "subjectId", dataType = "String", value = "业务ID", paramType = "query")
    })
    Result<ContractCountVO> getContractCount(Integer contractType, String subjectId);

    /**
     * 获取当前用户消息通知列表
     * @param memoInfoQuery 备忘录查询参数
     * @return page
     */
    @ApiOperation(value="获取当前用户消息通知列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "memoInfoQuery", dataType = "MemoInfoQuery", value = "备忘录查询参数", paramType = "query")
    })
    Result<HomePageMemoRemindRelationVO> getCurrentUserNoticeList(MemoInfoQuery memoInfoQuery);

    /**
     * 获取指定年月员工备忘录待办事项
     *
     * @param yearly    年份
     * @param monthly   月份
     * @param companyId 公司id
     * @return page
     */
    @ApiOperation(value = "获取指定年月员工备忘录待办事项")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "yearly", dataType = "Integer", value = "年份", paramType = "query"),
            @ApiImplicitParam(name = "monthly", dataType = "Integer", value = "月份", paramType = "query"),
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司id", paramType = "query")
    })
    Result<List<MemoListVO>> getToDoMemo(Integer yearly, Integer monthly, String companyId);

}

